Open Shortest Path First (Open Shortest Path First; OSPF) is an interior gateway protocol. The protocol specifies that routers on a subnet include: a designated router (Designated Router; DR), a backup designated router (Backup Designated Router; BDR), and a non-designated router or a non-backup designated router (Not DR or BDR; DR Other). All routers on the subnet have a same link state database (Link state database; LSDB). The DR generates a link state advertisement (Link state advertisement; LSA) representing the network. A router on the subnet needs to exchange LSDB information with the DR; the DR generates a piece of information (Network LSA) that describes the network for the network, and the DR floods the information to all other routers on the subnet. A router on the subnet, according to information (Router LSA) that describes a router node in the LSDB and the Network LSA in the LSDB, calculates a shortest path tree which adapts a local end as a root node, and calculates all routes in a subnet area according to the shortest path tree.
In the prior art, any node on a network needs to establish neighbor relationships with all other devices. However, a small device with a limited processing resource, after establishing neighbor relationships with a part of devices, may fail to establish connection relationships with other devices. Once these devices fail to establish router adjacency with routers that may function as a DR and a BDR, an OSPF function of these devices is affected. For example, subnet routes cannot be calculated or route information of a local end router cannot be released.